import Mock from 'mockjs';
// Mock.mock(请求地址，返回值)
Mock.mock('/museum-role/permission/getAllMenu', 'get', {
  code: 200,
  message: '获取所有菜单',
  data: {
    permissions: [
      {
        permissionId: 1,
        parentId: 0,
        name: '系统管理',
        path: '/system',
        redirect: '/system/user',
        component: 'Layout',
        status: 0,
        meta: {
          icon: 'el-icon-setting',
          title: '系统管理'
        },
        createTime: '2020-12-08 21:25:45',
        updateTime: '2020-12-08 21:25:45',
        children: [
          {
            permissionId: 2,
            parentId: 1,
            name: '用户管理',
            path: '/system/user',
            redirect: null,
            component: '/system/user/index',
            status: 0,
            meta: {
              icon: 'el-icon-user',
              title: '用户管理'
            },
            createTime: '2020-12-08 21:25:54',
            updateTime: '2020-12-08 21:25:54',
            children: []
          },
          {
            permissionId: 3,
            parentId: 1,
            name: '角色管理',
            path: '/system/role',
            redirect: null,
            component: '/system/role/index',
            status: 0,
            meta: {
              icon: 'el-icon-s-custom',
              title: '角色管理'
            },
            createTime: '2020-12-08 21:30:23',
            updateTime: '2020-12-08 21:30:23',
            children: []
          },
          {
            permissionId: 4,
            parentId: 1,
            name: '菜单管理',
            path: '/system/menu',
            redirect: null,
            component: '/system/menu/index',
            status: 0,
            meta: {
              icon: 'el-icon-s-order',
              title: '菜单管理'
            },
            createTime: '2020-12-08 21:27:36',
            updateTime: '2020-12-08 21:27:36',
            children: []
          },
          {
            permissionId: 5,
            parentId: 1,
            name: '地域管理',
            path: '/system/area',
            redirect: null,
            component: '/system/area/index',
            status: 0,
            meta: {
              icon: 'el-icon-setting',
              title: '地域管理'
            },
            createTime: '2020-12-08 21:30:22',
            updateTime: '2020-12-08 21:30:22',
            children: []
          }
        ]
      },
      {
        permissionId: 8,
        parentId: 0,
        name: '线索征集',
        path: '/111',
        redirect: null,
        component: 'Layout',
        status: 0,
        meta: {
          icon: 'el-icon-house',
          title: '线索征集'
        },
        createTime: '2020-12-08 21:29:37',
        updateTime: '2020-12-08 21:29:37',
        children: [
          {
            permissionId: 92,
            parentId: 8,
            name: '提交线索',
            path: '/333',
            redirect: null,
            component: '/444',
            status: 0,
            meta: {
              icon: 'el-icon-present',
              title: '提交线索'
            },
            createTime: '2020-12-08 21:29:37',
            updateTime: '2020-12-08 21:29:37',
            children: [
              {
                permissionId: 99,
                parentId: 8,
                name: '我要提交',
                path: '/333',
                redirect: null,
                component: '/444',
                status: 0,
                meta: {
                  icon: 'el-icon-present',
                  title: '我要提交'
                },
                createTime: '2020-12-08 21:29:37',
                updateTime: '2020-12-08 21:29:37',
                children: []
              },
              {
                permissionId: 101,
                parentId: 8,
                name: '我的记录',
                path: '/333',
                redirect: null,
                component: '/444',
                status: 0,
                meta: {
                  icon: 'el-icon-present',
                  title: '藏品录入'
                },
                createTime: '2020-12-08 21:29:37',
                updateTime: '2020-12-08 21:29:37',
                children: []
              }
            ]
          },
          {
            permissionId: 93,
            parentId: 8,
            name: '审批线索',
            path: '/333',
            redirect: null,
            component: '/444',
            status: 0,
            meta: {
              icon: 'el-icon-present',
              title: '审批线索'
            },
            createTime: '2020-12-08 21:29:37',
            updateTime: '2020-12-08 21:29:37',
            children: [
              {
                permissionId: 9,
                parentId: 8,
                name: '审批处理',
                path: '/333',
                redirect: null,
                component: '/444',
                status: 0,
                meta: {
                  icon: 'el-icon-present',
                  title: '审批处理'
                },
                createTime: '2020-12-08 21:29:37',
                updateTime: '2020-12-08 21:29:37',
                children: []
              },
              {
                permissionId: 94,
                parentId: 8,
                name: '审批记录',
                path: '/333',
                redirect: null,
                component: '/444',
                status: 0,
                meta: {
                  icon: 'el-icon-present',
                  title: '审批记录'
                },
                createTime: '2020-12-08 21:29:37',
                updateTime: '2020-12-08 21:29:37',
                children: []
              }
            ]
          }
        ]
      },
      {
        permissionId: 12,
        parentId: 0,
        name: '征集管理',
        path: '/123',
        redirect: null,
        component: 'Layout',
        status: 0,
        meta: {
          icon: 'el-icon-truck',
          title: '征集管理'
        },
        createTime: '2020-12-08 21:29:37',
        updateTime: '2020-12-08 21:29:37',
        children: [
          {
            permissionId: 6,
            parentId: 12,
            name: '线索提交',
            path: '/1234',
            redirect: null,
            component: '/458',
            status: 0,
            meta: {
              icon: 'el-icon-edit-outline',
              title: '线索提交'
            },
            createTime: '2020-12-08 21:29:37',
            updateTime: '2020-12-08 21:29:37',
            children: [
              {
                permissionId: 13,
                parentId: 6,
                name: '三级菜单1',
                path: '/asd',
                redirect: null,
                component: '/asdd',
                status: 0,
                meta: {
                  icon: null,
                  title: '三级菜单1'
                },
                createTime: null,
                updateTime: null,
                children: [
                  {
                    permissionId: 15,
                    parentId: 13,
                    name: '四级菜单',
                    path: '/asd778',
                    redirect: null,
                    component: '/asddd',
                    status: 0,
                    meta: {
                      icon: null,
                      title: '四级菜单'
                    },
                    createTime: null,
                    updateTime: null,
                    children: []
                  }
                ]
              },
              {
                permissionId: 14,
                parentId: 6,
                name: '三级菜单2',
                path: '/asd777',
                redirect: null,
                component: '/asdds',
                status: 0,
                meta: {
                  icon: null,
                  title: '三级菜单2'
                },
                createTime: null,
                updateTime: null,
                children: []
              }
            ]
          },
          {
            permissionId: 7,
            parentId: 12,
            name: '线索审核',
            path: '/555',
            redirect: null,
            component: '/999',
            status: 1,
            meta: {
              icon: 'el-icon-alarm-clock',
              title: '线索审核'
            },
            createTime: '2020-12-08 21:29:37',
            updateTime: '2020-12-08 21:29:37',
            children: []
          }
        ]
      }
    ]
  }
});

Mock.mock(RegExp('/museum-role/permission/openPermission' + '.*'), 'post', {
  code: 200,
  message: '打开菜单',
  data: null
});

Mock.mock(RegExp('/museum-role/permission/closePermission' + '.*'), 'post', {
  code: 200,
  message: '关闭菜单',
  data: null
});
